1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for providing printer services. Still more particularly, the present invention provides a method and apparatus for providing printing services independent of an application or device driver.
2. Description of Related Art
A print preview function in word processors and other applications is a feature that displays a formatted document on the video monitor rather than sending the document directly to the printer. Often times, a print preview provides an option in which the user may send the document to the printer after receiving the document on the monitor. Previewing documents with such a function prior to actually printing hard copies is a common step. Such a preview feature is often used to avoid printing multiple copies of a document in order to reduce paper consumption. In addition, print previews also are commonly used especially in distributed data processing systems in which a user, at a client computer generating a document, will typically send the print job to a printer server at a location that is remote to that of the client. Sometimes the printer server may be located on a different floor or building from the user at the client computer. Having to print a hardcopy and retrieve the copy for review each time a draft is produced would be time consuming and burdensome. Thus, users of such systems typically use a print preview function in which a document is generated and displayed to the user as the document would be printed on a printer.
Such a mechanism is very beneficial to the user. Problems, however, exist with presently available systems because the print interfaces are inconsistent. For example, with the print preview function, each application typically has its own print preview function. One function is an N Up function, which allows the display of two or more pages on a page. Some printer hardware supports this function, while others do not. Each time a new application is created, a print preview function must be supplied by the developers of the application to support different hardware.
Therefore, it would be advantageous to have an improved method and apparatus for providing printer support for a number of different applications and device drivers.
The present invention provides a method and apparatus in a data processing system for processing a print job. A call is received from an application to print the print job to a selected printer, wherein the print job includes a request to use a hardware service. A print preview of the print job prior to printing the print job is provided. Responsive to receiving an indication that the print job is to be printed after providing the print preview, the print job is sent to a device driver for the selected printer to print the print job. A determination is made as to whether the selected printer supports the hardware service. Responsive to a determination that the hardware service is unsupported by the selected printer, the hardware service is provided using a software simulation.